﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DELVE_GAME.ViewStructure.GameActions
{
    class PlayMapSelectGameAction : GameAction
    {
        View view;
        MapManager mapManager;
        int index;

        //game action sets map selected as target map to edit or select
        public PlayMapSelectGameAction(View targetView, MapManager mManager, int mapIndex)
        {
            view = targetView;
            mapManager = mManager;
            index = mapIndex;
        }

        public override void doAction()
        {
            mapManager.selectMap(index);
            if (view.getNetwork()) view.setHost(true);
            view.resetGametypeMenu();
            view.gotoStage((int)STAGES.GAMETYPE);
        }
    }
}
